<?php echo '<?xml version="1.0" encoding="utf-8"?>'?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html >
<head>
    <!-- Start: Meta Tags -->
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <!-- End: Meta Tags -->

    <!-- Title -->
    <title>Areal</title>

    <script type="text/javascript" src="<?= '/js/jquery-1.3.2.min.js' ?>"></script>
    <script type="text/javascript" src="<?= '/js/jquery-ui-1.7.1.custom.min.js' ?>"></script>
    <script type="text/javascript" src="<?= '/js/admin.js' ?>"></script>
    <script type="text/javascript" src="<?= '/js/tiny_mce/jquery.tinymce.js' ?>"></script>
    <script type="text/javascript">
	$().ready(function() {
		$('textarea.tinymce').tinymce({
			// Location of TinyMCE script
			script_url : '/js/tiny_mce/tiny_mce.js',

			// General options
			theme : "advanced",
			plugins : "safari,pagebreak,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,inlinepopups,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template",

			// Theme options
			theme_advanced_buttons1 : "bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,fontselect,fontsizeselect,cleanup,code,removeformat,",
			theme_advanced_buttons2 : "bullist,outdent,indent,|,link,unlink,image,media,|,forecolor,backcolor,|,hr,|,sub,sup",
                        theme_advanced_buttons3 : false,
                        theme_advanced_toolbar_location : "top",
			theme_advanced_toolbar_align : "left",
			theme_advanced_statusbar_location : "bottom",
			theme_advanced_resizing : true,

			// Example content CSS (should be your site CSS)
			content_css : "/css/brochure.css",

			// Drop lists for link/image/media/template dialogs
			template_external_list_url : "lists/template_list.js",
			external_link_list_url : "lists/link_list.js",
			external_image_list_url : "lists/image_list.js",
			media_external_list_url : "lists/media_list.js",

			// Replace values for the template plugin
			template_replace_values : {
				username : "Some User",
				staffid : "991234"
			}
		});
	});
    </script>



    <!-- Start: Link Tags -->
    <link rel="shortcut icon" href="<?= '/img/favicon.png' ?>" type="image/x-icon" />
    <link rel="stylesheet" type="text/css" href="<?= ('/css/admin.css'); ?>" />
    <link rel="stylesheet" type="text/css" href="<?= ('/css/ui/start/jquery-ui-1.7.1.custom.css'); ?>" />

    <?= $this->headLink() . "\n"; ?>
    <!-- End: Link Tags -->

    <!-- Start: Styles -->
    <?= $this->headStyle() . "\n"; ?>
    <!-- End: Styles -->
</head>
<body>


<div id="wrap">
<div id="head">
    <div class ="ui-widget-header ui-widget-content  ui-widget ui-corner-all">
        <h1>Areal Cms</h1>
        <p><?php echo $this->translate('Logged in as:'); ?>
        <?php
            $user_id = Zend_Auth::getInstance()->getIdentity()->getUserId();
            $user = Doctrine::getTable('Default_Model_User')->find($user_id);
            echo $user->first_name. ' ';
            echo $user->last_name;
        echo Zend_Auth::getInstance()->getIdentity()->email;   ?>

    <!--
    <a href="<?php
        echo $this->url(array('module' => 'default',
                              'controller'=>'user',
                              'action'=>'edit-profile') ,
                        'default', true);
        ?>"><?php echo  $this->translate('Edit profile'); ?></a>
    <a href="<?php
        echo $this->url(array('module' => 'default',
                              'controller'=>'user',
                              'action'=>'change-password') ,
                        'default', true);
        ?>"><?php echo  $this->translate('Change password'); ?></a>
    <a href="<?php
        echo $this->url(array('module' => 'default',
                              'controller'=>'user',
                              'action'=>'change-email') ,
                        'default', true);
        ?>"><?php echo  $this->translate('Change email'); ?></a>-->
    <a href="<?php
        echo $this->url(array('module' => 'default',
                              'controller'=>'user',
                              'action'=>'logout') ,
                        'default', true);
        ?>"><?php echo  $this->translate('Logout'); ?></a>


        </p>
    </div>
</div>

<div class="ui-bradcrumb ui-bar ui-widget-content  ui-widget ui-corner-all">
<?php echo $this->translate('You are in:') . ' '.$this->navigation()->breadcrumbs()->setLinkLast(false)->setMinDepth(0)->render();?>
</div>

<div id="main">
<!-- Column 2 start -->
    <div id="flash-container">
    <?php ?>
        <?php if ($this->flashMessenger()->hasCurrentMessages()):?>
            <div class ="ui-state-error ui-widget ui-corner-all"> <?= $this->htmlList($this->flashMessenger()->getCurrentMessages()); ?></div>
        <?php elseif ($this->flashMessenger()->hasMessages()):?>
            <div class ="ui-state-highlight ui-widget ui-corner-all"> <?= $this->htmlList($this->flashMessenger()->getMessages()); ?></div>
        <? endif; ?>
    </div>
    <div id="content" class="clearfix">
            <?= $this->layout()->content . "\n"; ?>
    </div>
<!-- Column 2 end -->
</div>
<div id="side">
<!-- Column 1 start -->
<div id="accordion" >
	<!--<h3  id="module_catalog"><a href="#catalog"><?php echo  $this->translate('Catalog'); ?></a></h3>
	<div>

        <?php echo $this->action('admin-menu', 'category', 'catalog', array()); ?>
	<hr />
        <ul>
            <li>
                <a href="<?php
                        echo $this->url(array('module' => 'catalog',
                                              'controller'=>'special',
                                              'action'=>'admin'),
                        'default', true)?>"><?php echo $this->translate('Specials'); ?></a>
            </li>
        </ul>   
	</div>
        -->
	<h3 id="module_default"><a href="#default"><?php echo  $this->translate('System'); ?></a></h3>
	<div>	
        <ul>
            <li>
                <a href="<?php
                        echo $this->url(array('module' => 'default',
                                              'controller'=>'user',
                                              'action'=>'admin'),
                        'default', true)?>"><?php echo $this->translate('Users'); ?></a>
            </li>
        </ul>                   
	</div>
	<h3 id="module_content"><a href="#content"><?php echo  $this->translate('Content'); ?></a></h3>
	<div>

            <?php echo $this->action('admin-menu', 'menu', 'content', array()); ?>
            <hr />
            <ul>
            <li>
            <a href="<?php
                    echo $this->url(array('module' => 'content',
                                          'controller'=>'album',
                                          'action'=>'admin'),
                    'default', true)?>"><?php echo $this->translate('Albums'); ?></a>
            </li>
           <!-- <li>
            <a href="<?php
                    echo $this->url(array('module' => 'content',
                                          'controller'=>'page',
                                          'action'=>'admin',
                                          'type_alias'=>'article'),
                    'default', true)?>"><?php echo $this->translate('Articles'); ?></a>
            </li>
            <li>
            <a href="<?php
                    echo $this->url(array('module' => 'content',
                                          'controller'=>'page',
                                          'action'=>'admin',
                                          'type_alias'=>'help'),
                    'default', true)?>"><?php echo $this->translate('Help'); ?></a>
            </li>-->
            </ul>
	</div>

       <!-- <h3 id="module_newsletter"><a href="#newsletter"><?php echo  $this->translate('Newsletter'); ?></a></h3>
	<div>
            <ul>
            <li>
            <a href="<?php
                    echo $this->url(array('module' => 'newsletter',
                                          'controller'=>'letter',
                                          'action'=>'admin'),
                    'default', true)?>"><?php echo $this->translate('Letters'); ?></a>
            </li>
            <li>
            <a href="<?php
                    echo $this->url(array('module' => 'newsletter',
                                          'controller'=>'subscriber',
                                          'action'=>'admin'),
                    'default', true)?>"><?php echo $this->translate('Subscribers'); ?></a>
            </li>
            </ul>
	</div>-->
</div>
<script>
    $(document).ready(function(){
        var element = $('#module_<?php echo $this->module ?>');
        $("#accordion").accordion({ active: element,
                                    //event: 'mouseover',
                                    animated: 'slide',
                                    autoHeight: false /*, fillSpace: true*/});
    });

</script>
        <!-- Column 1 end -->
</div>

<div id="footer" style="clear:both;">&nbsp;</div>

</div><!-- wrap -->
</body>
</html>